package com.roc.template.mongo.service.impl;

import com.roc.template.base.PageBean;
import com.roc.template.mongo.base.BaseServiceImpl;
import com.roc.template.mongo.dao.UserDao;
import com.roc.template.mongo.model.User;
import com.roc.template.mongo.service.UserService;
import com.roc.template.mongo.vo.UserVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName UserServiceImpl
 * @Description: TODO
 * @Author Administrator
 * @Date 2020/8/26 10 29
 * @Version V1.0
 **/
@Service
public class UserServiceImpl extends BaseServiceImpl<User> implements UserService {

    private UserDao userDao;

    @Resource
    public void setFileDirectoryDao(UserDao userDao) {
        this.userDao = userDao;
        super.setBaseDao(userDao);
    }

    @Override
    public PageBean<User> pageQuery(UserVo userVo) {
        return userDao.pageQuery(userVo);
    }

    @Override
    public User getByUserName(String username) {
        return userDao.getByUserName(username);
    }
}
